import { configureStore } from "@reduxjs/toolkit";
// 导入子模块
import counterReducer from './modules/counterStore'
import channelReducer from "./modules/channelStore";

const store = configureStore({
    reducer: {
        // add your reducers here
        counter: counterReducer,
        channel: channelReducer,
    },
})

export default store
// 导出RootState类型 - 关键步骤
export type RootState = ReturnType<typeof store.getState>;